<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D转换</title>
</head>
<style>
    .wrap {
        width: 200px;
        height: 200px;
        background-color: rgba(250, 0, 0, 0.5);
        margin: 100px auto;
        transform-style: preserve-3d;
        perspective: 300px;
    }

    .inner {
        width: 200px;
        height: 200px;
        background-color: yellowgreen;
        transform: scale(0.5);
    }
</style>

<body>
    <div class="wrap">
        <div class="inner"></div>
    </div>
</body>

</html>